<template>
  <div>
    <van-nav-bar title="影院"  left-arrow  @click-left="onClickLeft" @click-right="onClickRight">

      <template #left >
        <van-icon name="location-o" size="18" />
        <slot></slot>
      </template>
      <template #right >
        <van-icon name="search" size="18" />
      </template>
    </van-nav-bar>
  </div>
</template>
<script>
import Vue from 'vue';
import { NavBar } from 'vant';
import { Icon } from 'vant'
import http from "@/util/http";
Vue.use(Icon)
Vue.use(NavBar);
export default {
  name: 'NavBar2',
  methods: {
    onClickLeft() {
      this.$router.push('/city')
    },
    onClickRight() {
      this.$router.push('/cinemas/search')
    },
  },

}
</script>

<style scoped>
div{
  position: sticky;
  top: 0;
}
</style>
